// 文章相关接口模块
import { request } from '@/utils/request'

/**
 * 说明：获取文章列表
 * @params target 文章id
 */
export const getArticleListInfo = params => request({
  method: 'GET',
  url: '/v1_0/mp/articles',
  params
})

/**
 * 说明：删除文章
 * @params target 文章id
 */
export const deleteArticle = target => request({
  method: 'DELETE',
  url: `/v1_0/mp/articles/${target}`
})

/**
 * 说明：获取文章详情
 * @params target 文章id
 */
export const getArticleInfo = target => request({
  method: 'GET',
  url: `/v1_0/mp/articles/${target}`
})

/**
 * 说明：获取文章详情
 * @params image 图片 file
 */
export const updateImage = data => request({
  method: 'POST',
  url: '/v1_0/upload',
  data
})
